package yxy.game.pm2.bean.pubsub;

import yxy.apple.util.PubSub.Publisher;
import yxy.apple.util.PubSub.ISubscription;
import yxy.game.pm2.bean.mq.CCReason;

/**
 * @author wrs
 * @name TherionPublisher
 * @description 神兽玩法  神兽复活信息发布
 * @since 2022-06-17
 */
public class TherionPublisher extends Publisher {

    static private TherionPublisher instance;

    public static TherionPublisher getInstance() {
        if (instance == null) {
            instance = new TherionPublisher();
        }
        return instance;
    }

    private TherionPublisher(){

    }

    public void publish(String playerCode, CCReason reason, int gameType, int therionType) {
        this.publish(new TherionSubscription(playerCode, reason, gameType,therionType));
    }


    public class TherionSubscription implements ISubscription {
        private String playerCode;
        private CCReason reason;
        private int gameType;
        private int therionType;

        public TherionSubscription(String playerCode, CCReason reason, int gameType, int therionType) {
            this.playerCode = playerCode;
            this.reason = reason;
            this.gameType = gameType;
            this.therionType = therionType;
        }

        public String getPlayerCode() {
            return playerCode;
        }

        public CCReason getReason() {
            return reason;
        }

        public int getGameType() {
            return gameType;
        }

        public int getTherionType() {
            return therionType;
        }
    }
}
